package sctu.edu.java.year2016.team04.baiyunfei.day20160601.chapter9_2;

import java.util.Scanner;

/**
 * 创建一个类，在该类中定义一个方法，并在方法内部创建一个局部内部类通过局部内部类求任意两个数的乘积，并在外部类中进行测试
 * Created by DE on 2016/6/7.
 */
public class Chapter9_2 {
 int number;
    Scanner scanner=new Scanner(System.in);

public void show(){
    System.out.println("two number's product is :"+number);
}

    public void way(){
        System.out.println("please enter frist number:");
        int one=scanner.nextInt();
        System.out.println("please enter second number:");
        int two=scanner.nextInt();

        class product{
            public void compute(int one,int two){
             number=one*two;
            }


        }
        product b=new product();
        b.compute(one,two);
    }

    public static void main(String[] args) {

Chapter9_2 A=new Chapter9_2();

        A.way();
        A.show();



    }

}
